package net.hn.hnms.biz.emgcy.base;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @Author: baijiajun
 * @Date: 2022/9/22
 */
@Data
public class BaseEntity {
    private static final long serialVersionUID = 1L;

    @TableId(value ="id",type = IdType.AUTO)
    private Long id;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;

    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;

    @TableField(value = "deleted", fill = FieldFill.INSERT)
    //@TableLogic(value = "0", delval = "1")
    private String deleted;

    @TableField(value = "user_id", fill = FieldFill.INSERT)
    private String userId;

    /**
     * 煤矿编码
     */
    @TableField(value = "mine_code", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "煤矿编码",hidden=true)
    private String mineCode;
}
